package com.dynabook.ems.model.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;

/**
 * 新建工单请求DTO
 */
@Data
@ApiModel(value = "新建工单请求", description = "新建工单的请求参数")
public class WorkOrderAddRequest {
    
    @ApiModelProperty(value = "工单号", example = "WO202501001", required = true)
    @NotBlank(message = "工单号不能为空")
    private String workOrderNum;
    
    @ApiModelProperty(value = "成品型号", example = "ABC-123", required = true)
    @NotBlank(message = "成品型号不能为空")
    private String finishedProductModel;
    
    @ApiModelProperty(value = "版本号", example = "V1.0", required = true)
    @NotBlank(message = "版本号不能为空")
    private String version;
    
    @ApiModelProperty(value = "成品名称", example = "测试产品", required = true)
    @NotBlank(message = "成品名称不能为空")
    private String finishProductName;
    
    @ApiModelProperty(value = "机型名称", example = "Pearl20", required = true)
    @NotBlank(message = "机型名称不能为空")
    private String machineName;
    
    @ApiModelProperty(value = "生产数量", example = "100", required = true)
    @NotNull(message = "生产数量不能为空")
    @Positive(message = "生产数量必须大于0")
    private Integer productionQuantity;
}